interface Animal {
    name: string;
    age: number;
}

class Person implements Animal {

    public name: string;
    public age: number;
    
    constructor(name: string, age: number) {
        this.name = name;
        this.age = age;
    }

    setName(name: string) {
        this.name = name;
    }

    getName() {
        return this.name;
    }

    sleep () {
        console.log("Sleeping...")
    }
}

class Student extends Person {
    
    id: number;

    constructor(name: string, age: number, id: number) {
        super(name, age);
        this.id = id;
    }

    study () {
        console.log("Studying...");
    }
}

abstract class Teacher extends Person {

    abstract teach ();
}

class MathTeacher extends Teacher {

    teach() {
        console.log("Teach Math...");
    }
}

const person = new Person("Calong", 24);
console.log(person);